#!/bin/sh

# Check out googlecode source code:
echo Checking out googlecode source code...
svn up

# Check out quake3 source code:
svn co svn://svn.icculus.org/quake3/trunk quake3

# Patch the source:
cd quake3
patch -p0 -N < ../patchQuakeSource.txt
cd ..

# Add QV, IniParser and genetic dirs:
rsync -r --exclude=*.svn* resources/genetic quake3/
cp resources/run.sh quake3/
rsync -r --exclude=*.svn* resources/QV quake3/code/
rsync -r --exclude=*.svn* resources/IniParser quake3/code/
